home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
utils
/
x10dc165.zip
/
X10DCDOS.EXE
/
XDC.DOC
< prev
next >
Wrap
Text File
|
1996-05-31
|
13KB
|
317 lines
--------------------------------------------------------------------
XDC - X-10 Command Line Control
--------------------------------------------------------------------
Version 1.10
May 1996
Copyright 1994-1996 - D.Huras - All Rights Reserved
-------------------------------------------------XDC.DOC v1.10------
CONTENTS
--------------------------------------------------------------------
1. DESCRIPTION
2. FEATURES
3. WARRANTY & LICENSE
4. COMMAND LINE ARGUMENTS
5. XDC DOS ENVIRONMENT VARIABLE
6. COMMUNICATION PORTS
7. X-10 COMMAND DIRECTIVES
8. PROGRAM OVERVIEW
9. XDC ERRORLEVELS
10. RELEASE HISTORY
1. DESCRIPTION
--------------------------------------------------------------------
XDC is a command line driven program which sends 'immediate' command
directives to the X-10 CP290 Computer Interface. The CP290 will act
on these directives and impose the requested X-10 command signals
onto the powerline. The registered version of XDC is supplied with
the registered versions of X10DC (X-10 Direct Control) and X10EC
(X-10 Event Control) as a registration incentive; it is not
shareware and is not to be copied or distributed.
2. FEATURES
--------------------------------------------------------------------
-XDC supports all of the X-10 Commands supported by X10DC/X10EC
including the 5 undocumented commands, specifically:
- ON/OFF/DIM
- ALL LIGHTS ON/OFF
- ALL UNITS OFF
- FADE-OFF
- X-LIGHT
-XDC supports 16 discrete brightness levels for the DIM Command.
-XDC supports the synchronization of the CP290 Clock to the PC Clock
or the converse.
-Standard Commports 1 - 4 are supported as well as a User Defined
CommPort that can be comprised of any IRQ + Base I/O Address.
-A single X-10 Command can be passed to XDC on the command line OR
multiple X-10 Commands can be passed to XDC by creating a file of
X-10 Commands and passing the filename to XDC using the /F command
line argument.
Note: You cannot target multiple units with a single X-10 command
directive using XDC except where multiple units are implied
(ie. ALL LIGHTS ON).
3. WARRANTY & LICENSE
--------------------------------------------------------------------
XDC is supplied AS IS. The author disclaims all warranties,
expressed or implied, including, without limitation, the warranties
of merchantability and of fitness for any purpose. The author
assumes no liability for damages, direct or consequential, which may
result from the use of XDC.
You may use the program on a single machine, and make a backup copy,
but you are prohibited from making or transferring additional
copies.
You acknowledge that you have read this license, understand it and
agree to be bound by its terms as the complete and exclusive
statement of the agreement between us, superseding any proposal or
prior agreement, oral or written, and any other communications
between us relating to the subject matter of this license.
4. COMMAND LINE ARGUMENTS
--------------------------------------------------------------------
The following command line arguments can be entered in any order:
/Cn - COMMPORT where n = 1,2,3 & 4 [DEFAULT: 1]
/Annnn(n) - Base I/O Address applicable to User Defined CommPort
(Must be specified as a decimal number)
If /I argument is present, but /A is not; then Base
I/O Address will default to 1016 (3F8 Hex).
/In - IRQ applicable to User Defined CommPort where n = 1 - 15
If /A argument is present, but /I is not; then IRQ
will default to 4.
/F:[d]:\filespec - File Name containing X-10 Command directives
to be pressed. (eg. /F:C:\X10\X10.CMD)
/Q - Quiet Mode; Display no messages during program execution
/SYNC - Synchronize CP290 using PC Clock (will wait until top of
the minute, i.e. seconds=0)
/SYNCPC - Synchronize PC Clock to CP290 Clock (immediate)
/? - Display Command Line Arguments & Environment Variable syntax
h,u,c,l - X-10 Command Directive where:
h = House Code (A - P)
u = Unit Code (1 - 16)
c = X-10 Command (ON,OFF,DIM,ALLLIGHTSON,ALLLIGHTSOFF,
ALLUNITSOFF,FADEOFF,XLIGHT)
l = Level (1 - 16) when applicable
Notes:- The /C argument will be ignored if either the /I or /A
argument is passed on the command line.
- Command line options override any settings stored within
DOS environment variable, XDC.
- Multiple occurrences of the same command line argument
are accepted; the last instance will be used by XDC.
- X-10 Commands ALLLIGHTSON,ALLLIGHTSOFF,ALLUNITSOFF can
be abbreviated to ALON,ALOFF,AUOFF respectively.
- The Clock Synchronization command line arguments are mutually
exclusive, if multiple arguments are included on the command
line only the last instance will be acted upon. However, both
"SYNC" and "SYNCPC" can be included within command files passed
with the /F: argument.
5. XDC DOS ENVIRONMENT VARIABLE
--------------------------------------------------------------------
To minimize program size and improve performance, XDC does not
support an INI file of program parameters. However, you can avoid
using command line arguments by setting up a DOS environment
variable that contains program settings. The DOS environment
variable 'XDC' is used to pass settings to XDC.EXE. You use the
DOS 'SET' command to assign a value to an environment variable.
The syntax is:
SET XDC=c,i,a,q
where: c = CommPort (1 thru 4)
i = IRQ (1 - 15)
a = Base I/O address (must be > 0)
q = Quiet Mode
You do not need to specify values for parameters that you do
not wish to change. However, XDC environment variable parameters
are positional so you must use comma's as placeholders if you
wish to skip a parameter. Trailing comma placeholders are not
required. Examples are shown below:
To turn on Quiet Mode: SET XDC=,,,Q
To set CommPort to 2: SET XDC=2
To set CommPort to 2
and turn Quiet Mode On: SET XDC=2,,,Q
To set IRQ to 5: SET XDC=,5
To set IRQ to 5 and
Base I/O Address* 12832: SET XDC=,5,12832 *specify in decimal
The DOS environment variable only needs to be SET once so a logical
place for it is within your AUTOEXEC.BAT file.
Note: CommPort and IRQ+Base I/O Address are mutually exclusive
and you should set either one or the other. If both are
set then IRQ+Base I/O Address override CommPort.
6. COMMUNICATION PORTS
--------------------------------------------------------------------
XDC supports "pseudo standard" CommPorts 1 thru 4 using the
following settings:
+----------+------+------------------+
| | | Base I/O Address |
| CommPort | IRQ +---------+--------+
| | | Decimal | HEX. |
+----------+------+---------+--------+
| 1 | 4 | 1016 | 3F8 |
+----------+------+---------+--------+
| 2 | 3 | 760 | 2F8 |
+----------+------+---------+--------+
| 3 | 4 | 1000 | 3E8 |
+----------+------+---------+--------+
| 4 | 3 | 744 | 2E8 |
+----------+------┴---------+--------+
If one of these CommPort settings matches your hardware
configuration simply use the /C command line argument with the
appropriate CommPort. The XDC DOS Environment variable can also be
used.
If your hardware configuration differs from the table above, then
you can define your own CommPort by using the /I and /A command line
arguments or by setting the XDC DOS Environment variable. IRQ can
be set to any value between 1 and 15 (inclusive). Base I/O Address
can be set to any value greater than zero. CAUTION: your hardware
may "lock up" if incorrect settings are used. You should supply
both arguments (/A & /I), however, if you only supply one of the
arguments then the defaults applicable to CommPort 1 will apply to
the other argument. (eg. if only the /I5 argument is supplied, then
the /A argument defaults to 1016). Note that if XDC receives either
/I or /A or both, then any /C (CommPort) setting is ignored.
NOTES:
------
1) The Base I/L Address must be specified in decimal notation.
2) PS/2 Commports 3 - 8 must be specified using the /I and /A arguments.
IBM PS/2 CommPort Parameters are shown below:
+----------+------+------------------+
| PS/2 | | Base I/O Address |
| CommPort | IRQ +---------+--------+
| | | Decimal | HEX. |
+----------+------+---------+--------+
| 1 | 4 | 1016 | 3F8 |
| 2 | 3 | 760 | 2F8 |
| 3 | 3 | 12832 | 3220 |
| 4 | 3 | 12840 | 3228 |
| 5 | 3 | 16928 | 4220 |
| 6 | 3 | 16936 | 4228 |
| 7 | 3 | 21024 | 5220 |
| 8 | 3 | 21032 | 5228 |
+----------+------+---------+--------+
7. X-10 COMMAND DIRECTIVES
--------------------------------------------------------------------
X-10 Command Directives are structured as follows:
h,u,c,l
where: h = House Code (A - P)
u = Unit Code (1 - 16) [Not Required for Global Commands]
c = X-10 Command:
ON
OFF
DIM
ALL LIGHTS ON [can abbreviate to: ALON]*Global Command
ALL LIGHTS OFF [can abbreviate to: ALOFF]*Global Command
ALL UNITS OFF [can abbreviate to: AUOFF]*Global Command
FADEOFF [Dim Light to 1 then OFF]
XLIGHT [Exclusive Bright Light]
l = Level [Only REQUIRED for DIM, but also accepted for
ALL LIGHTS OFF + XLIGHT]
The h,u,c,l parameters are positional within the X-10 Command
Directive and the order cannot be changed. To skip a parameter it is
necessary to include a comma as a place holder. Any extraneous
parameters will be accepted (and ignored). Examples are shown
below:
A,1,ON Turn device A1 ON
A,1,DIM,16 DIM device A1 to 16 (Maximum Brightness)
A,,ALON Turn all Lights on House Code A ON
8. PROGRAM OVERVIEW
--------------------------------------------------------------------
When the program loads, it looks for the XDC variable in the DOS
Environment and then proceeds to parse it if found. If any errors
are detected then the program will terminate with an appropriate
message, otherwise it will parse the command line arguments (which
override the XDC environment variable). Once again, if any errors
are found it will terminate with an appropriate message. If the
/SYNC or /SYNCPC argument is found on the command line it will be
processed before any X-10 command directives on the command line.
If the /F: argument was included on the command line then XDC will
attempt to open the file and process the X-10 command directives.
Otherwise, XDC will look for a X-10 command directive on the command
line and execute it. Note: If both the /F: argument AND an X-10
Command Directive name are passed on the command line, XDC will
ignore the X-10 Command directive from the Command line and process
the X-10 Command Directives within the file specified with /F:.
If XDC encounters an invalid X-10 command directive it will
terminate with a message displaying the offending directive. When
XDC sends a command directive to the CP290, it waits for an
acknowledgement before sending another command directive.
9. XDC ERRORLEVELS
--------------------------------------------------------------------
XDC will return one of the following ERRORLEVELS to the operating
system upon program termination.
Normal Termination
------------------
0 - Program terminated normally; no errors
Execution Errors
----------------
97 - CP290 returned bad Checksum
98 - CP290 did not respond
99 - Fatal Communications Error
Syntax Errors
-------------
1 - Invalid COMMPORT on Command Line
2 - Invalid IRQ on Command Line
3 - Invalid BASE I/O Address on Command Line
5 - Invalid FileName on Command Line
6 - Invalid Command Line Argument
7 - No X-10 Command to execute
8 - Invalid XDC DOS Environment Variable
9 - Invalid COMMPORT in XDC Variable
10 - Invalid IRQ in XDC Variable
11 - Invalid BASE I/O Address in XDC Variable
14 - Invalid X-10 Command
15 - Invalid House Code in X-10 Command
16 - Invalid Unit Code in X-10 Command
17 - Invalid Dim Level in X-10 Command
10. RELEASE HISTORY
--------------------------------------------------------------------
VERSION DATE REVISION DESCRIPTION
======= ========= ================================================
1.10 May '96 ∙Clock Sychronization feature added
1.01 Oct. '94 ∙Respect for X10DC & X10EC Registration Keys added
1.00 April '94 ∙First Release
1.0ß April '94 ∙Initial Beta Version